In my case, I was running one of the mailer scripts for dotcut (formerly known as Carnival). The whole error looked like this:
root@nikita:/export/dotcut/bin# /export/dotcut/bin/globals-mailer-linked.pl
install_driver(mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.8.4/i486-linux/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.12: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.4/i486-linux/DynaLoader.pm line 230.
at (eval 11) line 3
Compilation failed in require at (eval 11) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/lib/perl5/5.8.4/Carnival/DB.pm line 12
The clue to fixing this problem is that the libmysqlclient.so.12 is missing. I ran 'locate' on the system and in fact it didn't exist at all. However, this was fixed with a very quick and dirty sybolic link hack like so:
ln -s /usr/lib/mysql/libmysqlclient.so.14 /usr/lib/mysql/libmysqlclient.so.12
The end result is a working mysql-client.
hth
christo